<template>
  <vue-office-docx :src="docx" @rendered="rendered" />
</template>

<script>
//引入VueOfficeDocx组件
import VueOfficeDocx from "@vue-office/docx";

export default {
  name: "WORD",
  components: {
    VueOfficeDocx,
  },
  data() {
    return {
      docx: "api/uploads/12.docx", //设置文档地址
      // docx: "http://localhost:8089/uploads/5ddd20c2-cb35-4871-beb2-6abc02a3ccb9.docx", //设置文档地址
    };
  },
  methods: {
    rendered() {
      console.log("渲染完成");
    },
  },
};
</script>
